package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-10-23 14:49
 */
public class Test08 {
    public static void main(String[] args) {
//        Scanner scanner=new Scanner(System.in);
//        System.out.println("输入y");
//        String answer=scanner.next();
//
//        while(!answer.equals("y")){
//            System.out.println("输入y");
//            answer=scanner.next();
//        }
//
//        System.out.println("继续执行，程序结束");

//        Scanner scanner=new Scanner(System.in);
//        String answer="aaaa";
//        while(!answer.equals("y")){
//            System.out.println("输入y");
//            answer=scanner.next();
//        }
//        System.out.println("继续执行，程序结束");


        Scanner scanner = new Scanner(System.in);
        System.out.println("输入y");
        String answer = scanner.next();

        while (!answer.equals("y")) {
            System.out.println("输入错误，重新输入y");
            answer = scanner.next();
        }

        System.out.println("继续执行，程序结束");


    }
}
